package com.baiyue.entity;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.validation.annotation.Validated;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @author 伍波
 * @date 2023-04-17
 */
@Data
@TableName("menu")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Validated
public class Menu implements Serializable {
    private static final long serialVersionUID = -6162203666973162745L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 菜单名称
     */
    private String name;
    /**
     * 菜单链接
     */
    private String path;
    /**
     * 父菜单ID
     */
    private Integer parentId;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 更新时间
     */
    private Date updateTime;
    /**
     * 创建人
     */
    private String createName;
    /**
     * 更新人
     */
    private String updateName;
    /**
     * icon 图标
     */
    private String iconCls;

    public Menu(String name, String path, Integer parentId, Date createTime, Date updateTime, String createName, String updateName) {
        this.name = name;
        this.path = path;
        this.parentId = parentId;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.createName = createName;
        this.updateName = updateName;
    }
}
